FROM golang:1.14-alpine
RUN echo 'Asia/Shanghai' >/etc/timezone

RUN apk add --no-cache git make

ADD ./build.sh ./
RUN sh ./build.sh

EXPOSE 53 53/udp
VOLUME ["/etc/coredns/Corefile"]
CMD ["/go/src/coredns/coredns","-conf","/etc/coredns/Corefile"]